//
// Created by 32827 on 2024/1/10.
//

#ifndef STM32OSCOVER_YZL_ICONV_H
#define STM32OSCOVER_YZL_ICONV_H
#include "yz.h"
#include "iconv.h"
#include "string.h"
typedef unsigned short ucs2; //Unicode2 16bits.
typedef unsigned char utf8;  // utf-8 8bits.
//https://github.com/smoothwind/ucs2-utf8

extern utf8 yzl_iconv_utf8_buf[512];
extern ucs2 yzl_iconv_ucs2_buf[256];
void yzl_iconv_clear_ucs2_buf();
void yzl_iconv_clear_utf8_buf();
uint16_t yzl_iconv_utf8_strlen(const utf8 *str);
uint16_t yzl_iconv_ucs2_strlen(const ucs2 *str);
ucs2 *utf2ucs (ucs2 *dst, utf8 *src);
utf8 *ucs2utf (utf8 *dst, ucs2 *src);
#endif //STM32OSCOVER_YZL_ICONV_H
